﻿Imports Equipment.DataAccess

Public Class RequirementReviewLookup


#Region "Properties"
    Private _type As RequirementReviewType
    Public Property ID As RequirementReviewType
        Get
            Return _type
        End Get
        Set(ByVal value As RequirementReviewType)
            _type = value
        End Set
    End Property

    Private _desc As String
    Public Property Description As String
        Get
            Return _desc
        End Get
        Set(ByVal value As String)
            _desc = value
        End Set
    End Property
#End Region

#Region "Public Section"
    Public Shared Function RetrieveAll() As List(Of RequirementReviewLookup)
        Dim result As New List(Of RequirementReviewLookup)

        result.Add(New RequirementReviewLookup With {.ID = RequirementReviewType.Required, .Description = "Required"})
        result.Add(New RequirementReviewLookup With {.ID = RequirementReviewType.NotRequired, .Description = "Not Required"})
        result.Add(New RequirementReviewLookup With {.ID = RequirementReviewType.RequiredOnlyForException, .Description = "Required only for Exception"})

        Return result
    End Function

    Public Shared Function GetDescriptionByType(ByVal type As RequirementReviewType) As String
        Dim first = RetrieveAll().SingleOrDefault(Function(f) f.ID = type)
        Return first.Description
    End Function

#End Region

End Class
